package com.logistics.modules.vehicleManagement.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logistics.common.utils.PageUtils;
import com.logistics.modules.transportationManagement.entity.CargoEntity;
import com.logistics.modules.vehicleManagement.entity.VehicleEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.Map;

/**
 * 
 * 
 * @author HURRICANE
 * @email HURRICANE@nb.com
 * @date 2022-05-07 09:25:16
 */
@Mapper
public interface VehicleDao extends BaseMapper<VehicleEntity> {

     IPage<VehicleEntity> queryPageByStatus(@Param("page") IPage<VehicleEntity> page,
                                                   @Param("key") String key,
                                                   @Param("vStatus") String vStatus);

     int updateVehicleStatusById(@Param("vehicleStatus") Integer vehicleStatus, @Param("id") Integer id);

     int countByVehicleStatus(@Param("vehicleStatus") Integer vehicleStatus);

     VehicleEntity selectOneById(@Param("id") Integer id);

     int countByVehicleTypeId(@Param("vehicleTypeId") Integer vehicleTypeId);

}
